﻿#pragma once


#include"MusicPlatform.h"
#include"KuGouApi.h"
#include"KuGouApiSource1.h"
#include<memory>

class KuGou  : public MusicPlatform
{
	Q_OBJECT
private:
	std::unique_ptr<KuGouApi> m_api;
	QString m_baseUrl;
public:
	KuGou(const QString& baseUrl = "localhost:3000", QObject* parent = nullptr);
	~KuGou();
	void search(const QString& keyword) override;
	//平台标识
	QString platformId() const override;
	void play(const QString& songId) override;
	void setApiSource(std::unique_ptr<KuGouApi> apiSource);
private:
	//获取验证码
	void getCaptcha();
};
